<template>
  <div class="warning-popup">
    <div class="popupTitle">{{ item.effectiveAreaName }}</div>
    <div class="bottom">
      <div class="early">
        <img
          :src="`/guotuicon/${item.warnLevel}_${item.eventTypeCode}.jpg`"
          class="guoiconImg"
          alt=""
          srcset=""
        />
        <p :class="['warningcont']">{{ item.createTime }}{{ item.headline }}</p>
      </div>
      <div class="listbox">
        <div class="title">预警区域</div>
        <div>{{ item.warnDescription }}</div>
      </div>
      <div class="listbox">
        <div class="title">防御指南</div>
        <div>{{ item.defenseGuidelines }}</div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
const props = defineProps(['item'])
</script>

<style scoped lang="scss">
.warning-popup {
  width: 400px;
  .popupTitle {
    line-height: 50px;
    padding-left: 17px;
    font-family: 'ALIMAMA_SHUHEITI_BOLD';
    color: #fff;
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 10px;
    background: url('@/assets/images/warningpoptop.png') no-repeat 0/100% 100%;
  }
  .bottom {
    width: 100%;
    box-sizing: border-box;
    background: url('@/assets/images/warningpopbottom.png') no-repeat -1px/100% 100%;
    padding: 16px 12px;
  }
  .early {
    font-size: 14px;
    display: flex;
    justify-content: space-around;
    .guoiconImg {
      width: 57px;
      height: 47px;
      margin-right: 16px;
    }
    .warningcont {
      align-self: center;
      color: #fff;
    }
  }
  .listbox {
    text-align: left;
    display: flex;
    margin-top: 11px;
    background: #4a3417;
    padding: 6px;
    border-left: 3px solid #ff9e1b;
    color: #fff;
    .title {
      color: #e0d9cf;
      margin-right: 20px;
      align-self: centerv;
      &::before {
        content: '';
        display: inline-block;
        width: 4px;
        height: 4px;
        background: #ff9e1b;
        box-shadow: 0px 0px 6px 1px rgba(255, 153, 0, 0.36);
        border-radius: 3px 3px 3px 3px;
        margin: 0 8px;
      }
    }
  }
}
</style>
